using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using Ent.Web.Helper;

public partial class Controls_TransTable : System.Web.UI.UserControl
{
    private BorderStyle _borderStyle = BorderStyle.None;
    public BorderStyle BorderStyle
    {
        get { return _borderStyle; }
        set { _borderStyle = value; }
    }
    private string _borderColor = "#000000";
    public string BorderColor
    {
        get { return _borderColor; }
        set { _borderColor = value; }
    }
    private string _borderWidth = "0px";
    public string BorderWidth
    {
        get { return _borderWidth; }
        set { _borderWidth = value; }
    }
    private Control _childControl;
    public Control ChildControl
    {
        get { return _childControl; }
        set { _childControl = value; }
    }
    private System.Drawing.Color _backgroundColor;
    public System.Drawing.Color BackgroundColor
    {
        get { return _backgroundColor; }
        set { _backgroundColor = value; }
    }
    private int _transparency;
    public int Transparency
    {
        get { return _transparency; }
        set { _transparency = value; }
    }
    private Unit _height = Unit.Percentage(100);
    public Unit Height
    {
        get { return _height; }
        set { _height = value; }
    }
    private Unit _width = Unit.Percentage(100);
    public Unit Width
    {
        get { return _width; }
        set { _width = value; }
    }
    public Controls_TransTable()
    {
        this.PreRender += new EventHandler(Controls_TransTable_PreRender);
    }

    void Controls_TransTable_PreRender(object sender, EventArgs e)
    {
        //if (BrowserHelper.Browser != BrowserType.FF)
        //    div_Box.Style.Add(HtmlTextWriterStyle.Height, StringHelper.ConvertUnitToString(_height));
        div_Box.Style.Add(HtmlTextWriterStyle.Width, StringHelper.ConvertUnitToString(_width));
        div_Box.Style.Add(HtmlTextWriterStyle.Height, StringHelper.ConvertUnitToString(_height));
        div_Box.Style.Add(HtmlTextWriterStyle.BorderColor, _borderColor);
        div_Box.Style.Add(HtmlTextWriterStyle.BorderStyle, _borderStyle.ToString());
        div_Box.Style.Add(HtmlTextWriterStyle.BorderWidth, _borderWidth);
        div_Bg.Style.Add("opacity", Convert.ToString(_transparency / 100.00));
        div_Bg.Style.Add("filter", "alpha(opacity=" + _transparency + ")");
        div_Bg.BackColor = _backgroundColor;
    }
    protected override void OnInit(EventArgs e)
    {
        base.OnInit(e);
        div_Body.Controls.Add(_childControl);
    }
    protected void Page_Load(object sender, EventArgs e)
    {

    }
}
